﻿using System;
using System.Collections.Generic;
using Qadir.Runtime.InteropServices;

namespace QadirPInvokeSample
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.Title = "Qadir.Runtime.InteropServices Demo";
            PInvoke pinvoke = new PInvoke(new string[] { "kernel32.dll" });
            while (true)
            {
                Console.Write("Enter a new title for the console: ");
                pinvoke.GetFunctionFromPool<bool>("SetConsoleTitle", Console.ReadLine());
                Console.WriteLine("Hit ENTER to continue.");
                Console.ReadLine();
                Console.Clear();
            }
        }
    }
}
